package org.iweb.ui.page;

import org.iweb.init.RegisterFactory;

@SuppressWarnings({"rawtypes"})
public class PageFactory {

	private static PageFactory instance;
	
	public Class getPage(String path){
		return getRegister().getPages().get(path);
	}
	
	protected PageRegister getRegister(){		
		return (PageRegister) RegisterFactory.getInstance().getRegisterByName("PageRegister");		
	}

	public static PageFactory getInstance() {
		if(instance==null)
			instance=new PageFactory();
		return instance;
	}
	
}
